package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-08-20
 * Time: 20:48
 */
public class Card {
    //结合成为一张牌
    private String suit;//花色
    private int rank;//大小

    public Card(String suit, int rank) {//构造方法
        this.suit = suit;
        this.rank = rank;
    }
    //设置和获得一张牌的花色和大小
    public String getSuit() {
        return suit;
    }

    public void setSuit(String suit) {
        this.suit = suit;
    }

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    @Override
    public String toString() {
        return "【" +
                 suit +
                ", " + rank +
                '】';
    }
}
